<script setup lang="ts">
import { ref } from "vue";

const activeIndex = ref("1");
const handleSelect = (key: string, keyPath: string[]) => {
  console.log(key, keyPath);
};

</script>

<template>
  <div class="any-container">
    <div class="common-layout">
      <el-container>
        <el-header style="padding: 0;">
          <el-menu
            :default-active="activeIndex"
            class="el-menu-demo"
            mode="horizontal"
            @select="handleSelect"
            router
          >
            <el-menu-item index="1" route="/PIXI">Pixi</el-menu-item>
            <el-menu-item index="2" route="/WebGPU">WebGPU</el-menu-item>
          </el-menu>
        </el-header>
        <el-container>
          <el-main style="padding: 0">
            <router-view />
          </el-main>
        </el-container>
      </el-container>
    </div>
  </div>
</template>

<style lang="less">
html,
body {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  #app {
    height: 100%;
    width: 100%;
    .any-container {
      height: 100%;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      .common-layout {
        height: 100%;
        width: 100%;
        display: flex;
      }
    }
  }
}
</style>
